function getTime() {
  const date = new Date()
  let month = date.getMonth() + 1
  month = month < 10 ? '0' + month : month
  let day = date.getDate()
  day = day < 10 ? '0' + day : day
  return `${month}-${day}`
}

function getTimeText() {
  const date = new Date()
  let month = date.getMonth() + 1
  let day = date.getDate()
  return `${month}月${day}日`
}

function getTimeAll() {
  const date = new Date()
  let year = date.getFullYear()
  let month = date.getMonth() + 1
  month = month < 10 ? '0' + month : month
  let day = date.getDate()
  day = day < 10 ? '0' + day : day
  let hour = date.getHours()
  hour = hour < 10 ? '0' + hour : hour
  let  sec = date.getSeconds()
  sec = sec < 10 ? '0' + sec : sec
  let min = date.getMinutes()
  min = min < 10 ? '0' + min : min

  return `${year}${month}${day}${hour}${min}${sec}`
  
}

  function getWeek() {
    const date = new Date()
    const weeks = ['星期日','星期一','星期二','星期三','星期四','星期五','星期六']
    return weeks[date.getDay()]
  }
module.exports = {
  getTime,
  getTimeText,
  getTimeAll,
  getWeek
}